package jinyilw.swing.visuals.border;

import java.awt.Color;
import java.awt.Font;

import javax.swing.JLabel;
import javax.swing.border.Border;

import jinyilw.swing.FontTools;
import jinyilw.swing.i18n.ICSetting;
import jinyilw.swing.visuals.Icomp.IRichLabel;

public class RTitledBorder extends TitledBorder
{
	private static final long serialVersionUID = 6990935403071564590L;

	public RTitledBorder(Border border, String title, int titleJustification,
			int titlePosition, Font titleFont, Color titleColor)
	{
		super(border, title, titleJustification, titlePosition, titleFont,
				titleColor);
	}

	public RTitledBorder(String title, int titleJustification,
			int titlePosition, Font titleFont, Color titleColor)
	{
		super(null, title, titleJustification, titlePosition, titleFont,
				titleColor);
	}

	public RTitledBorder(String title, int titleJustification, Font titleFont,
			Color titleColor)
	{
		super(null, title, titleJustification, DEFAULT_POSITION, titleFont,
				titleColor);
	}

	public RTitledBorder(String title, Font titleFont, Color titleColor)
	{
		super(null, title, DEFAULT_JUSTIFICATION, DEFAULT_POSITION, titleFont,
				titleColor);
	}

	public RTitledBorder(String title)
	{
		this(title, FontTools.getCustomFont(13), Color.CYAN);
	}

	public RTitledBorder(Border border, ICSetting iTitle,
			int titleJustification, int titlePosition, Font titleFont,
			Color titleColor)
	{
		super(border, iTitle, titleJustification, titlePosition, titleFont,
				titleColor);
	}

	public RTitledBorder(ICSetting iTitle, Font titleFont, Color titleColor)
	{
		this(null, iTitle, DEFAULT_JUSTIFICATION, DEFAULT_POSITION, titleFont,
				titleColor);
	}

	public RTitledBorder(ICSetting iTitle)
	{
		this(iTitle, FontTools.getCustomFont(13), Color.CYAN);
	}

	@Override
	protected JLabel createLabel()
	{
		return new IRichLabel();
	}
}
